#include <stdio.h>
#define N 40
void main(){
	int i,sum=0,mode=0,feedback[N],modes[10]={0};
	double mid;
	for (i=0;i<N;i++){
		scanf("%d",&feedback[i]);
		sum+=feedback[i];
		modes[feedback[i]]++;
	}
	for (i=0;i<10;i++){
		mode = modes[i]>modes[mode]?i:mode;
	}
	i=20;
	int j=0;
	while (i>0){
		i-=modes[j];
		j++;
	}
	if (i!=0)
	mid=j-1;
	else mid=j-1/2;
	printf("%f %f %d",sum/40.0,mid,mode);
}
